import getApiData from "@/services/cpasRequest";
import notify from 'devextreme/ui/notify';

// 获取报表项目基础数据
// account.reportItem.getDataList 
export async function getReportItemsData(params: {
  dbname: string;
  Data_ID: string;
  ownerReport?: string
}) {
  const res = await getApiData("account.reportItem.getDataList", params);
  return Promise.resolve({
    data: res.data,
    success: res.ok,
  });
}

// 获取期末总计
export async function getReportItemsBasicBalanceCheck(params: {
  dbname: string;
  Data_ID: string;
}) {
  const res = await getApiData("account.reportItem.getBalanceCheck", params);
  return Promise.resolve({
    data: res.data,
    success: res.ok,
  });
}

// 获取报表项目的构成项目
export async function getReportItemsSumRef(paramsApiName: string, params: {
  dbname: string;
  Data_ID: string;
  FKGUID: any;
}) {
  const res = await getApiData(paramsApiName, params);
  return Promise.resolve({
    data: res.data,
    success: res.ok,
  });
}
